Root-relative paths Provide the path from the site's root folder to a document.
Note: If you understand the strengths and limitations of root-relative paths, they can be useful, but if you're not familiar with root-relative paths, document-relative paths are recommended.
A root-relative path begins with a leading forward slash, which stands for the site root folder. For example, /support/tips.html is a root-relative path to a file (tips.html) in the support subfolder of the site's root folder.
A root-relative path often provides the best way to specify links in a Web site in which you need to frequently move HTML files from one folder to another. When you move a document that contains root-relative links, you don't need to change the links; for example, if your HTML files use root-relative links for dependent files (such as images), then if you move an HTML file, its dependent-file links are still valid. However, when you move or rename the documents linked to with root-relative links, you do need to update those links, even if the documents' paths relative to each other haven't changed. For example, if you move a folder, all root-relative links to files within that folder must be updated. (If you move or rename files using the Site window, Dreamweaver helps you update all relevant links.)
Define a local site in Dreamweaver by choosing a local root folder to serve as the equivalent of the document root on a server. (See Creating a local site.) Dreamweaver uses this folder to determine the root-relative paths to files.
Root-relative links are interpreted by servers, not by browsers, so if you open a local page that uses root-relative links in your browser (without using Preview in Browser from within Dreamweaver), the links don't work. When you use the Preview in Browser feature to preview a document that uses root-relative links, Dreamweaver temporarily converts those links (in the previewed file only) to use absolute file:// paths. However, you can preview only one page at a time that uses root-relative links—if you follow a link from the previewed page, the new page's root-relative links are not converted, and the browser can't follow such links. Previewing pages in framesets that use root-relative links results in similar problems.
To preview a set of pages that use root-relative links, do one of the following:
![]() |
Put the files on a remote server and view them from there. |
![]() |
(Windows only) Choose Edit > Preferences, and in Preview in Browser preferences, select Preview Using Local Server. To use this option, you must be running a Web server on your local computer. |